<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Java漏洞靶场</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>


<body>

<div style="padding: 40px;
    text-align: center;
    background: #1abc9c;
    color: white;">
  <h1>Java漏洞演示平台</h1>
  <button class="ui inverted secondary basic button"><a style="color: white" th:href="home">回到首页</a></button>
</div>

<div style="text-align: center;margin: 0px auto;
     margin-top: 50px;">
  <input id="id" type="text" placeholder="请输入id"><br><br>
  <input id="name" type="text" placeholder="请输入用户名"><br><br>
  <input id="pwd" type="password" placeholder="请输入密码"><br><br>
  <input id="start" type="submit" value="注册">
  <p></p>
</div>

<script>
$("#start").click(function () {
        var user= {
        "id" : $("#id").val(),
        "name" : $("#name").val(),
        "pwd" : $("#pwd").val()
        };
        $.ajax({
            type : "POST",
            async : true,
            contentType: "application/x-www-form-urlencoded; charset=utf-8",
            data : user,
            success : function(){
　　　　　　      alert('注册成功');
                window.location.href ="../csrf";
            },
            error : function(){
　　　　　　      alert('注册失败');
                window.location.href ="../csrf";
            },
        })
    }
);

<!--</script>-->


</body>
</html>

